<%@ page language="java" pageEncoding="ISO-8859-1"%>
<%@ page import="java.util.*" %>
<%@ page import="java.sql.*" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>   
    <title><%=(String)session.getAttribute("qbx_number") %></title>
    <%
    	if(session.getAttribute("username")==null||session.getAttribute("username").toString().equals(""))
    	{
    		response.sendRedirect(request.getContextPath()+"/login.jsp");
    		return;
    	}
    	else if(request.getParameter("mark")==null||request.getParameter("mark").equals(""))
    	{
    		response.sendRedirect(request.getContextPath()+"/QBX_VM_Edit/CreateAisles.jsp");
    		return;
    	}
    %>
	
	<style media=print>  
   .Noprint{display:none;}<!--用本样式在打印时隐藏非打印项目-->  
   .PageNext{page-break-after: always;}<!--控制分页-->  
 	</style>
    
    <jsp:useBean id="dbHandle" scope="application" class="DBHandle.General" />
    <script src="../../JavaScript/jquery-1.6.4.js"></script>
    <script src="../../JavaScript/Ajax_div.js"></script> 
	<script src="../../JavaScript/CreateConfirm.js"></script>
  </head>
  
  <body>
  	<div class="Noprint"><span> VM
  	<img alt="==>" src="../../Image/arrowLeft.gif" border="0">&nbsp;
  	<a onclick="history.go(-2)">VM Profile</a>
  	<img alt="==>" src="../../Image/arrowLeft.gif" border="0">&nbsp;
  	<a onclick="history.go(-1)">VM Profile</a>
  	<img alt="==>" src="../../Image/arrowLeft.gif" border="0">&nbsp;
  	<a >VM Profile</a>
  	</span>
  	</div>
  	<div class="tab">
    	<br>
   		<hr>
    	<br>
  	</div>
  	<div>
  		<label>VM Model:<%=(String)session.getAttribute("model") %></label>&nbsp;&nbsp;
  		<label>QBX Number:<%=(String)session.getAttribute("qbx_number") %></label>&nbsp;&nbsp;
  		<label>Alona Number:<%=(String)session.getAttribute("alona_number") %></label>&nbsp;&nbsp;
  		<label>Number of Aisles:<%=(String)session.getAttribute("aisles_number") %></label>&nbsp;&nbsp;
  		<label>Venue Code:<%=(String)session.getAttribute("venue_code") %></label>&nbsp;&nbsp;
  		<label>Venue Type:<%=(String)session.getAttribute("venue_type") %></label>&nbsp;&nbsp;
  		<label>Number of Units:<%=(String)session.getAttribute("unit") %></label>&nbsp;&nbsp;
  		<label>City of VM:<%=(String)session.getAttribute("city") %></label>&nbsp;&nbsp;
  		<label>Region of VM:<%=(String)session.getAttribute("region") %></label>&nbsp;&nbsp;
  		<br>
  	</div>
  	<div class="Noprint">
  		<button id="print" type="button">Print</button>
  		<button id="excel" type="button">Save as Excel</button>
  	</div>
  	<div>
  	<form id="form1">
  		<div class="PrintArea">
  		<table id="table"> 
  			<%
  			for(int i=0;i<7;i++)
  			{
  				out.print("<tr><th></th>");
  				for(int j=1;j<9;j++)
  				{
  					out.print("<th>A"+String.valueOf(i*8+j)+"</th>");
  				}
  				out.print("</tr>");
  				out.print("<tr id='item'><th scope=\"row\">Item</th>");
  				for(int k=1;k<9;k++)
  				{
  					out.print("<td name='I"+String.valueOf(i*8+k)+"'>"+(String)request.getParameter("I"+String.valueOf(i*8+k))+"</td>");
  				}
  				out.print("</tr>");
  				out.print("<tr id='price'><th scope=\"row\">Price</th>");
  				for(int k=1;k<9;k++)
  				{
  					out.print("<td name='P"+String.valueOf(i*8+k)+"'>"+(String)request.getParameter("P"+String.valueOf(i*8+k))+"</td>");
  				}
  				out.print("</tr>");
  			}
  		 	%>
		</table>
		</div>
		<div class="Noprint">
			<button type="button" id="back">Back</button>
			<button type="button" id="create">Confirm&Create</button>
		</div>
	</form>
 	</div>
  </body>
</html>